package com.ims.core.doc.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.doc.mapper.TInNon1005Mapper;
import com.ims.core.doc.domain.TInNon1005;
import com.ims.core.doc.service.ITInNon1005Service;

/**
 * 通用定额发票Service业务层处理
 *
 * @author IMS
 * @date 2024-11-20
 */
@Service
public class TInNon1005ServiceImpl implements ITInNon1005Service
{
    @Autowired
    private TInNon1005Mapper tInNon1005Mapper;

    /**
     * 查询通用定额发票
     *
     * @param id 通用定额发票主键
     * @return 通用定额发票
     */
    @Override
    public TInNon1005 selectTInNon1005ById(Long id)
    {
        return tInNon1005Mapper.selectTInNon1005ById(id);
    }

    /**
     * 查询通用定额发票列表
     *
     * @param tInNon1005 通用定额发票
     * @return 通用定额发票
     */
    @Override
    public List<TInNon1005> selectTInNon1005List(TInNon1005 tInNon1005)
    {
        return tInNon1005Mapper.selectTInNon1005List(tInNon1005);
    }

    /**
     * 新增通用定额发票
     *
     * @param tInNon1005 通用定额发票
     * @return 结果
     */
    @Override
    public int insertTInNon1005(TInNon1005 tInNon1005)
    {
        tInNon1005.setCreateTime(DateUtils.getNowDate());
        return tInNon1005Mapper.insertTInNon1005(tInNon1005);
    }

    /**
     * 修改通用定额发票
     *
     * @param tInNon1005 通用定额发票
     * @return 结果
     */
    @Override
    public int updateTInNon1005(TInNon1005 tInNon1005)
    {
        tInNon1005.setUpdateTime(DateUtils.getNowDate());
        return tInNon1005Mapper.updateTInNon1005(tInNon1005);
    }

    /**
     * 批量删除通用定额发票
     *
     * @param ids 需要删除的通用定额发票主键
     * @return 结果
     */
    @Override
    public int deleteTInNon1005ByIds(Long[] ids)
    {
        return tInNon1005Mapper.deleteTInNon1005ByIds(ids);
    }

    /**
     * 删除通用定额发票信息
     *
     * @param id 通用定额发票主键
     * @return 结果
     */
    @Override
    public int deleteTInNon1005ById(Long id)
    {
        return tInNon1005Mapper.deleteTInNon1005ById(id);
    }
}
